<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>   
<%@ include file="/common/taglib.jsp"%>
<%
String contextPath = request.getContextPath();
String jspContextPath = contextPath+"/WEB-INF/page";
String commonContextPath = contextPath+"/common";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/main.css'/>" />

<link rel="stylesheet" type="text/css" href="<c:url value='/resource/bootstrap/css/bootstrap.css'/>" />
<link rel="stylesheet" type="text/css" href="<c:url value='/resource/bootstrap/css/bootstrap-table.css'/>" />
<link rel="stylesheet"  href="<c:url value='/resource/jxkh/css/zTreeStyle/zTreeStyle.css'/>" type="text/css" />
<link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/DeclareView.css'/>" />
<link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/fullcalendar.css'/>" />
<link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/fullcalendar.print.css'/>" />
<!--树结构-->
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery-1.11.0.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery.form.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jeDate/jedate.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/layer/layer.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/bootstrap/bootstrap.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/bootstrap/bootstrap-table.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/bootstrap/bootstrap-table-zh-CN.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery.ztree.core.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery.ztree.excheck.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery.ztree.exedit.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/fullcalendar.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/scrolling.js'/>" ></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/calendar2.js'/>" ></script>
<script type="text/javascript" src="<c:url value='/resource/jxkh/js/echarts.min.js'/>" ></script>
<script type="text/javascript" src="<c:url value='/resource/js/map.js'/>"></script>
<script type="text/javascript" >
    /*function totalTextFormatter(data) {
        return 'Total';
    }*/

    function totalNameFormatter(data) {
        return data.length;
    }

    function DateFormat(jsonDate) {
        //json日期格式转换为正常格式
        var jsonDateStr = jsonDate.toString();//此处用到toString（）是为了让传入的值为字符串类型，目的是为了避免传入的数据类型不支持.replace（）方法
        try {
            var k = parseInt(jsonDateStr.replace("/Date(", "").replace(")/", ""), 10);
            if (k < 0)
                return null;

            var date = new Date(parseInt(jsonDateStr.replace("/Date(", "").replace(")/", ""), 10));
            var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
            var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
            var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
            var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
            var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
            var milliseconds = date.getMilliseconds();
            return date.getFullYear() + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
        }
        catch (ex) {
            return "时间格式转换错误";
        }
    }

    function ShortDateFormat(jsonDate) {
        //json日期格式转换为短格式
        var jsonDateStr = jsonDate.toString();//此处用到toString（）是为了让传入的值为字符串类型，目的是为了避免传入的数据类型不支持.replace（）方法
        try {
            var k = parseInt(jsonDateStr.replace("/Date(", "").replace(")/", ""), 10);
            if (k < 0)
                return null;

            var date = new Date(parseInt(jsonDateStr.replace("/Date(", "").replace(")/", ""), 10));
            var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
            var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
            return date.getFullYear() + "-" + month + "-" + day;
        }
        catch (ex) {
            return "时间格式转换错误";
        }
    }

    function showMessage(content){
        layer.open({
            title: '信息'
            , content: content
        })
    }
</script>
